# Exit script

此控制陳述式可停止指令碼執行。它可以插入指令碼的任一處。

Exit Script [ (when | unless) condition ]

由於 exit script 陳述式是控制陳述式，因此會以分號或行尾結束，且不得跨越行邊界。

引數

| 引數 | 描述 |
| --- | --- |
| condition | 評估結果為 True 或 False 的邏輯運算式。 |
| when / unless | 透過選擇性使用 when 或 unless 子句，可使 exit script 陳述式成為條件式。 |

`//Exit script` `Exit Script;` `//Exit script when a condition is fulfilled` `Exit 
 Script when a=1`

[Exit](https://help.qlik.com/zh-TW/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptControlStatements/Exit.htm)